package com.hospital.demo.mapper.libokun;

import com.hospital.demo.model.libokun.DrugReturn;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface DrugReturnMapper {
    //查询全部进货单信息
    @Select("SELECT * from drugsreturn")
    List<DrugReturn> SelectAllReturn();
    //按ID查询药品信息
    @Select("SELECT * from drugsreturn where drugsreturn.drrid=#{drrid}")
    List<DrugReturn>SelectByRId(@Param("drrid") Integer drrid);

    //删除进货单
    @Delete("delete from drugsreturn where drugsreturn.drrid=#{drrid}")
    Integer DelectReturn(@Param("drrid") Integer drrid);
    //填写进货单
    @Insert("INSERT into drugsreturn values(Null,#{drugreturn.drrname},#{drugreturn.drrnumber},#{drugreturn.drrpriceout},#{drugreturn.drrdate})")
    List<DrugReturn>InsertReturn(@Param("drugreturn") DrugReturn drugreturn);
}
